package mest.dao.Modeling;

import mest.VO.Modeling.WarehouseSaveFile_manytomany.savefileVO;
import mest.entity.warehouse_file;
import mest.entity.warehousesave_manytomany;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description
 * @auther Machenike
 * @create 2019-11-16 1:23
 */

public interface IwarehouseFileDao {

    //    1.新增功能
    int insertWarehouseFileType(warehouse_file ct,@Param("theirDb")String theirDb) throws  Exception;

    //   2.基本查询-数量
    int selectCount(String theirDb);

    //   3.基本查询-分页
    List<warehouse_file> findWarehouseFilePage(@Param("index") int index, @Param("pageSize") int pageSize,@Param("theirDb")String theirDb);


    //  toolbar  添加存货功能中的查看物料内容         --分页
    List<savefileVO> findSaveByWFId(@Param("wfId") int bomid,@Param("commName") String commName, @Param("index") int index, @Param("pageSize") int pageSize,@Param("theirDb")String theirDb);
    //  toolbar  添加存货功能中的查看物料内容         --数量
    int SaveCount(@Param("wfId") int id,@Param("commName") String commName,@Param("theirDb")String theirDb);

    //toolbar  添加存货功能中的添加多对多关系功能
    int insertManytomany_WarehouseAndSave(@Param("wsmtm")warehousesave_manytomany wsmtm,@Param("theirDb")String theirDb);


    // toolbar 修改多对多的物料内容
    int updateManytomany_WarehouseAndSave(@Param("wsmtm") savefileVO wsmtm,@Param("theirDb")String theirDb);

    // toolbar 删除多对多的物料内容
    int delManytomany_WarehouseAndSave(savefileVO wsmtm,@Param("theirDb")String theirDb);

	Integer getNumber_WarehouseAndSave(@Param("id")Integer id, @Param("theirDb")String theirDb);

	Integer updateNumber_WarehouseAndSave(@Param("id")Integer id, @Param("number")Integer number, @Param("theirDb")String theirDb);

    //根据bomid和存货id查询是否已在多对多表存在
    public Map<String,Object> examine(Map<String,Object> map);
}
